<h1>Listing invoices</h1>

<%= link_to 'Home', root_path %> | <%= link_to 'New Invoice', new_invoice_path %>

<table border="1">
  <thead>
    <tr>
      <th>Code</th>
      <th>Date</th>
      <th>Total fee</th>
      <th>Total discount</th>
    </tr>
  </thead>

  <tbody>
    <% @invoices.each do |invoice| %>
      <tr>
        <td><%= link_to invoice.code, invoice %></td>
        <td><%= invoice.date %></td>
        <td><%= invoice.total_fee %></td>
        <td><%= invoice.total_discount %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

